package com.oceansoft.mobile.weixin.entity.message.req;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/**
 * 为了方便保存用户发送的 各种类型的消息，本类综合了所有类型消息的内容
 * @author qiur
 *
 */
public class SuperMessage {
		private long sid;
	   // 开发者微信号  
		private String ToUserName;
		// 发送方帐号（一个OpenID）  
		private String FromUserName;
		// 消息创建时间 （整型）  
		private long CreateTime;
		// 消息类型（text/image/location/link）  
		private String MsgType;
		// 消息id，64位整型  
		private long MsgId;
		
		// 消息内容  
		private String Content;
		// 地理位置纬度  
		private String Location_X;
		// 地理位置经度  
		private String Location_Y;
		// 地图缩放大小  
		private String Scale;
		// 地理位置信息  
		private String Label;
		// 消息标题  
		private String Title;
		// 消息描述  
		private String Description;
		// 消息链接  
		private String Url;
		// 图片链接  
		private String PicUrl;
		//图片消息媒体id，可以调用多媒体文件下载接口拉取数据。
		private String MediaId;
		//视频消息缩略图的媒体id，可以调用多媒体文件下载接口拉取数据
		private String ThumbMediaId;
		//语音格式
		private String Format;
		//语音识别结果，UTF8编码
		private String Recognition;
		
		public SuperMessage() {
			super();
		}
		public static RowMapper<SuperMessage> getFullNewsMapper() {
			return new RowMapper<SuperMessage>() {
				@Override
				public SuperMessage mapRow(ResultSet rs, int index) throws SQLException {
					SuperMessage obj = new SuperMessage();
					obj.setSid(rs.getLong("sid"));
					obj.setToUserName(rs.getString("ToUserName"));
					obj.setContent(rs.getString("content"));
					obj.setCreateTime(rs.getLong("CreateTime"));
					obj.setFromUserName(rs.getString("nickname"));
					obj.setPicUrl(rs.getString("PicUrl"));
					obj.setMsgId(rs.getLong("MsgId"));
					return obj;
				}
			};
		}
		
		public long getSid() {
			return sid;
		}

		public void setSid(long sid) {
			this.sid = sid;
		}

		public String getContent() {
			return Content;
		}

		public void setContent(String content) {
			Content = content;
		}

		public String getToUserName() {
			return ToUserName;
		}

		public void setToUserName(String toUserName) {
			ToUserName = toUserName;
		}

		public String getFromUserName() {
			return FromUserName;
		}

		public void setFromUserName(String fromUserName) {
			FromUserName = fromUserName;
		}

		public long getCreateTime() {
			return CreateTime;
		}

		public void setCreateTime(long createTime) {
			CreateTime = createTime;
		}

		public String getMsgType() {
			return MsgType;
		}

		public void setMsgType(String msgType) {
			MsgType = msgType;
		}

		public long getMsgId() {
			return MsgId;
		}

		public void setMsgId(long msgId) {
			MsgId = msgId;
		}


		public String getLocation_X() {
			return Location_X;
		}

		public void setLocation_X(String location_X) {
			Location_X = location_X;
		}

		public String getLocation_Y() {
			return Location_Y;
		}

		public void setLocation_Y(String location_Y) {
			Location_Y = location_Y;
		}

		public String getScale() {
			return Scale;
		}

		public void setScale(String scale) {
			Scale = scale;
		}

		public String getLabel() {
			return Label;
		}

		public void setLabel(String label) {
			Label = label;
		}

		public String getTitle() {
			return Title;
		}

		public void setTitle(String title) {
			Title = title;
		}

		public String getDescription() {
			return Description;
		}

		public void setDescription(String description) {
			Description = description;
		}

		public String getUrl() {
			return Url;
		}

		public void setUrl(String url) {
			Url = url;
		}

		public String getPicUrl() {
			return PicUrl;
		}

		public void setPicUrl(String picUrl) {
			PicUrl = picUrl;
		}


		public String getMediaId() {
			return MediaId;
		}

		public void setMediaId(String mediaId) {
			MediaId = mediaId;
		}

		public String getThumbMediaId() {
			return ThumbMediaId;
		}

		public void setThumbMediaId(String thumbMediaId) {
			ThumbMediaId = thumbMediaId;
		}

		public String getFormat() {
			return Format;
		}

		public void setFormat(String format) {
			Format = format;
		}

		public String getRecognition() {
			return Recognition;
		}

		public void setRecognition(String recognition) {
			Recognition = recognition;
		}

		
}
